import request from '@/utils/request'

// 查询采购订单列表
export function listTinaBill (query) {
  return request({
    url: '/tina/bill/list',
    method: 'get',
    params: query
  })
}

// 查询采购订单详细
export function getTinaBill (id) {
  return request({
    url: '/tina/bill/' + id,
    method: 'get'
  })
}

// 新增采购订单
export function addTinaBill (data) {
  return request({
    url: '/tina/bill',
    method: 'post',
    data: data
  })
}

// 修改采购订单
export function updateTinaBill (data) {
  return request({
    url: '/tina/bill',
    method: 'put',
    data: data
  })
}

// 删除采购订单
export function delTinaBill (id) {
  return request({
    url: '/tina/bill/' + id,
    method: 'delete'
  })
}

// 导出采购订单
export function exportTinaBill (query) {
  return request({
    url: '/tina/bill/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/tina/bill/getInitData/' + dictTypes,
    method: 'get'
  })
}
